package com.firexxx.study.asyncservlet.task;

import com.firexxx.study.performancetest.task.IFixedTimeConsumeTask;
import com.firexxx.study.performancetest.task.IRestPressureTestTask;
import com.firexxx.study.performancetest.task.ITask;
import com.firexxx.study.performancetest.timeconsume.ITimeConsume;
import lombok.Data;

/**
 * TODO
 *
 * @author fireXXX
 * @date 2020/11/19 0:14
 **/
@Data
public class AsyncServletTask extends IRestPressureTestTask {

    @Override
    public Object runOne() {
        long start = System.currentTimeMillis();
        getRestTemplateHandler().doGet(getUrl(), Void.class);

        return System.currentTimeMillis() - start;
    }

}